(n, list)
Lisp_Object n, list;
{
+ struct gcpro gcpro1, gcpro2;
+ Lisp_Object next;
int count = specpdl_ptr - specpdl;
- register int arg = XINT (n);
+ register int arg;
#if 0 /* This is a good feature, but would make undo-start
unable to do what is expected. */
Lisp_Object tem;
list = Fcdr (list);
#endif
+ CHECK_NUMBER (n, 0);
+ arg = XINT (n);
+ next = Qnil;
+ GCPRO2 (next, list);
+
/* Don't let read-only properties interfere with undo. */
if (NILP (current_buffer->read_only))
specbind (Qinhibit_read_only, Qt);
{
while (1)
{
- Lisp_Object next;
next = Fcar (list);
list = Fcdr (list);
/* Exit inner loop at undo boundary. */
arg--;
}
+ UNGCPRO;
return unbind_to (count, list);
}